ChooseFile displays on the screen the standard dialog to open a document. Only files with the types specified by Str_Expr are shown.
If the user selects and opens a file, its full pathname is returned in the Var parameter. If the user clicks on the cancel button, an empty string is returned in Var.
If Str_Expr is an empty string, all types of documents are shown.
You specify the type(s) to be shown with a sequence of four characters which stand for the type of the file. You can specify up to 4 different types.
Example
You want the user to be able to choose a MacPaint™ or a picture file. To do this, you write :
`...
`The MacPaint™ file type is PNTG
`The Picture file type is PICT
ChooseFile(FileName;"PNTGPICT")
If(FileName#"")
`a file has been choosen
else
`The user has clicked on cancel
End if
Important
a) You cannot specify more than 4 types. If you specify more than 4 parameters, the others are ignored.
b) ChooseFile works like SET CHANNEL(10;"") or SET CHANNEL(13;"") except it does not open the file. After calling ChooseFile, you can open the file by using SET CHANNEL(Var) where Var contains the complete path of the file.